﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TB.Web.UI.TreeGridDemo.Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>First Simple Demo</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <div>some feature</div>
    <ul>
    <li>Support Ajax</li>
    <li>Support Postback</li>
    <li>Support Callback</li>
    <li>Support Event -- Select Edit Update Delete</li>
    <li>Support DataBind like TreeView</li>
    <li>Support DataBind like GirdView</li>
    <li>Support ASP.net 2.0, but this demo is 3.5, because ajax</li>
    </ul>
    <div>future work</div>
    <ul>
    <li>Data Bind from DataSource</li>
    <li>Design Mode Support</li>
    <li>A icon for this control -- who can help me?</li>
    <li>Examples and Document</li>
    <li>Testing, if you find bugs, please tell me, thank you!</li>
    <li>sherwin zhu. sherwinzhu@126.com</li></ul>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
    <div>hint:<asp:Label ID="LblHint" runat="server" Text=""></asp:Label></div>
    <div>
    <tbwc:treegrid ID="TreeGrid" runat="server" ShowHeader="true" 
        ShowFooter ="false" Caption="This is TreeGird's Caption" ExpandDepth="1" PopulateNodesFromClient="false"
        CaptionAlign="Left" NodeWrap="false" LineImagesFolder="~/TreeViewLines" 
        ShowLines="true" CssClass="tgDefault" ImageSet="XPFileExplorer" 
        NodeCellPosition="1" OnSelectedNodeChanged="TreeGrid_SelectedNodeChanged" 
        OnNodePopulate="TreeGrid_NodePopulate" OnRowCommand="TreeGrid_RowCommand" 
        onNodeDataBound="TreeGrid_NodeDataBound" >
    <HeaderStyle BackColor="Gainsboro" />
    <NodeStyle Display="Inline" />
    <Columns>
        <asp:TemplateField HeaderText="FirstColumn">
            <itemtemplate><%# Eval("C1") %></itemtemplate>
            <ItemStyle Width="100px" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="第二列">
            <itemtemplate><%# Eval("C2") %></itemtemplate>
            <ItemStyle Width="200px" />
        </asp:TemplateField>
            <asp:TemplateField HeaderText="第三列">
            <itemtemplate><%# Eval("C3")  %></itemtemplate>
            <ItemStyle Width="100px" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="第四列">
            <itemtemplate><asp:Literal ID="LtrForth" Text='<%# Eval("C4")  %>' runat="server"></asp:Literal></itemtemplate>
            <ItemStyle Width="100px" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="第五列">
            <itemtemplate><%# Eval("C5") %></itemtemplate>
            <ItemStyle Width="60px" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="第六列">
            <itemtemplate><%# Eval("C6") %></itemtemplate>
            <edititemtemplate><asp:TextBox ID="TxtSixth" Text='<%# Eval("C6") %>' runat="server" Width="60px" Height="12px"></asp:TextBox></edititemtemplate>
            <ItemStyle Width="100px" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="编辑列">
        <itemstyle cssclass="listOp" />
        <itemtemplate>
            <asp:ImageButton ID="LbtnEdit" runat="server" CommandName="Edit" 
                ToolTip="编辑" ImageUrl="img/opEdit.gif"></asp:ImageButton>
            <asp:LinkButton ID="LbtnUpdate" runat="server" CommandName="Update" 
                Text="Update"></asp:LinkButton>
            <asp:LinkButton ID="LbtnCancle" runat="server" CommandName="Cancel" 
                Text="Cancel"></asp:LinkButton>
            <asp:ImageButton ID="LbtnDel" runat="server" CommandName="Remove" 
                ToolTip="删除" ImageUrl="img/opDel.gif"></asp:ImageButton>
        </itemtemplate>
    </asp:TemplateField>
    </Columns>
    </tbwc:treegrid>
    </div>
        </ContentTemplate>
    </asp:UpdatePanel>
        
    </form>
</body>
</html>
